package com.morehair.controller.wx;


import com.morehair.bean.bo.wx.WxCommentCountBo;
import com.morehair.bean.bo.wx.WxCommentListBo;
import com.morehair.bean.vo.admin.BaseRespVo;
import com.morehair.bean.vo.wx.WxCommentCountVo;
import com.morehair.bean.vo.wx.WxCommentListVo;
import com.morehair.service.wx.WxCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("wx/comment")
public class WxCommentController {
    @Autowired
    WxCommentService commentService;
    @RequestMapping("count")
    public BaseRespVo countComment(WxCommentCountBo commentCountBo){
        WxCommentCountVo commentCountVo = commentService.getCommentCount(commentCountBo);
        return BaseRespVo.ok(commentCountVo);
    }

    @RequestMapping("list")
    public BaseRespVo listComment(WxCommentListBo commentListBo){
        WxCommentListVo commentListVo=commentService.getCommentList(commentListBo);
        return BaseRespVo.ok(commentListVo);
    }

}
